﻿using Microsoft.EntityFrameworkCore;
using System;
using System.Collections.Generic;
using System.Text;

namespace Core.CurrentFramework.Repository.Entity
{
    public class CurrentDbContext : DbContext
    {

        public CurrentDbContext(DbContextOptions<CurrentDbContext> option) : base(option)
        {

        }
        public DbSet<Users> Users { get; set; }
        public DbSet<UsersInfo> UsersInfo { get; set; }
        

        protected override void OnModelCreating(ModelBuilder modelBuilder)
        {
            modelBuilder.Entity<Users>().HasData(new Users { id = 3,  Age =19,  Birthday =DateTime.Now, Email="12@qq.com", Hight="160cm", Hobby="篮球", IndexPath="baidu.com", Name="留影", Note="x", Phone="13142021102", Sex="男" }
            , new Users { id = 4, Age = 19, Birthday = DateTime.Now, Email = "12@qq.com", Hight = "160cm", Hobby = "篮球", IndexPath = "baidu.com", Name = "留影", Note = "x", Phone = "13142021102", Sex = "男" },
            new Users { id = 5, Age = 19, Birthday = DateTime.Now, Email = "12@qq.com", Hight = "160cm", Hobby = "篮球", IndexPath = "baidu.com", Name = "留影", Note = "x", Phone = "13142021102", Sex = "男" },
            new Users { id = 6, Age = 19, Birthday = DateTime.Now, Email = "12@qq.com", Hight = "160cm", Hobby = "篮球", IndexPath = "baidu.com", Name = "留影", Note = "x", Phone = "13142021102", Sex = "男" },
            new Users { id = 7, Age = 19, Birthday = DateTime.Now, Email = "12@qq.com", Hight = "160cm", Hobby = "篮球", IndexPath = "baidu.com", Name = "留影", Note = "x", Phone = "13142021102", Sex = "男" },
            new Users { id = 8, Age = 19, Birthday = DateTime.Now, Email = "12@qq.com", Hight = "160cm", Hobby = "篮球", IndexPath = "baidu.com", Name = "留影", Note = "x", Phone = "13142021102", Sex = "男" }
            );
        }
    }
}
